﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="InserirEmpresa.aspx.cs" Inherits="CursoUNICEUB.InserirEmpresa" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        Cadastrar uma empresa
    </h1>
    <table>
        <tr>
            <td>
                <asp:Label ID="Label1" runat="server">Nome da empresa : </asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtNome" MaxLength="50" Width="260px" 
                    ValidationGroup="incluir" />
                <asp:RequiredFieldValidator ID="rfvNome" runat="server" ErrorMessage="Nome da empresa."
                    ControlToValidate="txtNome" Text="*" ForeColor="Red" 
                    ValidationGroup="incluir"/>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label2" runat="server">Telefone : </asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtTelefone" MaxLength="8" Width="81px" />
                <asp:MaskedEditExtender ID="txtTelefone_MaskedEditExtender" runat="server" 
                    CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                    CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                    CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" 
                    Mask="9999-9999" TargetControlID="txtTelefone">
                </asp:MaskedEditExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtTelefone" ErrorMessage="Telefone." ForeColor="Red" 
                    ValidationGroup="incluir">*</asp:RequiredFieldValidator>
           </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label3" runat="server">e-mail : </asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtEmail" MaxLength="50" Width="260px" 
                    ValidationGroup="incluir" />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtEmail" ErrorMessage="email inválido" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ForeColor="Red" ValidationGroup="incluir">*</asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="Email."
                    ControlToValidate="txtEmail" Text="*" ForeColor="Red" 
                    ValidationGroup="incluir"/>
           </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <asp:Button ID="btnInserirEmpresa" runat="server" Text="Cadastrar" 
                    ValidationGroup="incluir" onclick="btnInserirEmpresa_Click" />
                <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" PostBackUrl="~/Default.aspx" />
                <asp:ValidationSummary ID="vSum" runat="server" HeaderText="Favor verificar os seguintes campos :"
                    ShowMessageBox="True" ShowSummary="False" ValidationGroup="incluir" />
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
            </td>
        </tr>
    </table>

</asp:Content>
